home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-05 | 1022 b | 44 lines | [TEXT/MPS ] |
- Perl -Sx "{0}" {"Parameters"}>"{TempFolder}"noweb.run
- "{TempFolder}"noweb.run
- Exit
-
- #!perl
- # Copyright 1991 by Norman Ramsey. All rights reserved.
- # See file COPYRIGHT for more information.
-
- $mntopt = "-L";
- $tex = 1;
- $output = 1;
-
- while ($ARGV[0] =~ /^-/) {
- $arg = shift @ARGV;
-
- if ($arg =~ /^-[ot]+$/) {
- $tex = 0 if $arg =~ /t/;
- $output = 0 if $arg =~ /o/;
- } elsif ($arg =~ /^-L/) {
- $mntopt = $arg;
- } elsif ($arg eq "-markup") {
- $markup = shift @ARGV;
- } else {
- die "Unrecognized option $arg"
- }
- }
-
- $#ARGV > -1 || die "Usage: noweb [-L[fmt] -t -o] file [...]";
-
- print "Set Commands \"||LIB||," . $ENV{Commands} ."\"; Export Commands\n;
-
- while ($source = shift @ARGV) {
- if ($output) {
- print "markup -t $source | mnt -t3 $mntopt -all\n";
- }
- if ($tex) {
- ($texname = $source) =~ s/\.[^.]*$//;
- $texname .= ".tex";
- print "markup $source | finduses -noquote | noidx -delay |";
- print "perl -pe 's/^@defn \S*$/@literal \\let\\nwnotused=\\nwoutput{}/' |";
- print "totex -delay | cpif $texname\n";
- }
- }
-